home *** CD-ROM | disk | FTP | other *** search
/ 1,000+ Great Games / 1_1000 Games.iso / DOSGAMES / BOGGLE.ZIP / SOURCE.ZIP / DICT.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-03  |  811 b   |  39 lines

  1. #ifndef  DICTIONARY_H
  2. #define  DICTIONARY_H
  3.  
  4. #include <iwindow.hpp>
  5. #include <fstream.h>
  6. #include <ctype.h>
  7. #include <stdlib.h>
  8. #include <string.h>
  9.  
  10. const int myMAX = 150;
  11.  
  12. class Dictionary;
  13.  
  14. class Dictionary {
  15.  
  16.    streampos loc[myMAX];
  17.    ifstream  dict;
  18.    ifstream  ndx;
  19.    char *Index[myMAX];
  20.    int NX;
  21.    char Buffer[50];
  22.  
  23.    protected:
  24.       void initIndex();
  25.       void setBuffer(char *str);
  26.  
  27.    public:
  28.       Dictionary(char *, char *);
  29.       void ToUpper(char *, char *);  // converts string to upper case
  30.  
  31.       int Lookup(char *);  // lookup word given and return a positive
  32.                            //   'found' condition, or a negative
  33.                            //   'not found'
  34.       int prefix (char *str, char *buf);
  35.       char *getBuffer();
  36. };
  37.  
  38. #endif
  39.